<template>
	<view class="home">
		<!-- 自定义导航栏组件 -->
		<navbar></navbar>
		<tab :list="tabList" @tab="tab"></tab>

		<list-scroll>
			<list-card v-for="item in 5"></list-card>
		</list-scroll>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello',
				tabList: [] //导航栏信息
			}
		},
		onLoad() {
			// 获取 tab 导航栏的信息
			this.getLabel();
		},
		methods: {
			getLabel() {
				this.$api.get_label({
					url: 'get_label'
				}).then(res => {
					const {
						data
					} = res;
					this.tabList = data;
				})
			},
			tab(data, index) {
				console.log(data, index);
			}
		}
	}
</script>

<style lang="scss">
	page {
		height: 100%;
		display: flex;
	}

	.home {
		display: flex;
		flex-direction: column;
		flex: 1;
		border: 1px solid red;
		overflow: hidden;
	}
</style>
